<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>商品展示</title>
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css">
    <link href="css/mystyle.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-3.2.1.min.js"></script>
    <script src="js/bootstrap.min.js"> </script>
    <script type="text/javascript" src="js/jqthumb.js"></script>

</head>
<body>
<!-- 顶部banner -->
<div class="container">
    <div class="banner">
        <ul class="nav nav-pills topmenu">
            <li role="presentation"><a href="${pageContext.request.contextPath}/productServlet">主页</a></li>
            <li role="presentation"><a href="CommodityRegistered.jsp">用户注册</a></li>
            <li role="presentation"><a href="CommodityForgetPassword.jsp">忘记密码</a></li>
            <li role="presentation"><a href="${pageContext.request.contextPath}/feedbackServlet?demand=showAll">意见反馈</a></li>
        </ul>
    </div>
</div>

<!-- 导航菜单-->
<div class="container showMove">
    <div class="btn-group btn-group-justified" role="group" aria-label="...">
        <div class="btn-group" role="group">
            <button type="button" class="btn btn-info" ><a href="${pageContext.request.contextPath}/productServlet?demand=queryKitchen&src=show" class="btn-info">厨卫专区</a></button>
        </div>
        <div class="btn-group" role="group">
            <button type="button" class="btn btn-info"><a href="${pageContext.request.contextPath}/productServlet?demand=queryWashing&src=show" class="btn-info">洗衣机专区</a></button>
        </div>
        <div class="btn-group" role="group">
            <button type="button" class="btn btn-info"><a href="${pageContext.request.contextPath}/productServlet?demand=queryComputer&src=show" class="btn-info">电脑专区</a></button>
        </div>
        <div class="btn-group" role="group">
            <button type="button" class="btn btn-info"><a href="${pageContext.request.contextPath}/productServlet?demand=queryTV&src=show" class="btn-info">电视机专区</a></button>
        </div>
    </div>
</div>

<!-- 商品展示区-->
<div class="container showMove">
    <div class="row">
        <div class="col-md-12">
            <div class="container-fluid">
                <div class="row">
                    <c:forEach items="${sessionScope.productAllList}" var="product">
                        <div class="col-md-3 p_info">
                            <img src="${product.image}" class="img-acresponsive">
                            <div class="p-info">
                                <p>${product.name}</p><p> ${product.price}</p>
                                <p>
                                    <a href="${pageContext.request.contextPath}/shoppingCartServlet?demand=buy&id=${product.id}" class="btn btn-info btn-sm space">购买</a>
                                    <a href="${pageContext.request.contextPath}/productServlet?demand=detail&src=detail&id=${product.id}" class="btn btn-info btn-sm">详情</a>
                                </p>
                            </div>
                        </div>
                    </c:forEach>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="footerbg center showMove">
    <p> Designed and built with all the love in the world by @mdo and @fat. Maintained by the core team with the help of our contributors.</p>
</div>

</body>
</html>
